using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes.DomainAttributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Enums;
using System.Collections.Generic;
using System.ComponentModel;

namespace Baci.ArcGIS._ConversionTools._SAS
{
    /// <summary>
    /// <para>Table To SAS</para>
    /// <para>Converts a table to a SAS dataset.</para>
    /// <para>将表转换为 SAS 数据集。</para>
    /// </summary>    
    [DisplayName("Table To SAS")]
    public class TableToSAS : AbstractGPProcess
    {
        /// <summary>
        /// 无参构造
        /// </summary>
        public TableToSAS()
        {

        }

        /// <summary>
        /// 有参构造
        /// </summary>
        /// <param name="_in_table">
        /// <para>Input Table</para>
        /// <para>The input table.</para>
        /// <para>输入表。</para>
        /// </param>
        /// <param name="_out_sas_dataset">
        /// <para>Output SAS Dataset (libref.tablename)</para>
        /// <para>The output SAS dataset. Provide the dataset in the form libref.table in which libref is the name of a SAS library and table is the name of the SAS table.</para>
        /// <para>输出 SAS 数据集。以 libref.table 的形式提供数据集，其中 libref 是 SAS 库的名称，table 是 SAS 表的名称。</para>
        /// </param>
        public TableToSAS(object _in_table, object _out_sas_dataset)
        {
            this._in_table = _in_table;
            this._out_sas_dataset = _out_sas_dataset;
        }
        public override string ToolboxName => "Conversion Tools";

        public override string ToolName => "Table To SAS";

        public override string CallName => "conversion.TableToSAS";

        public override List<string> AcceptEnvironments => [];

        public override object[] ParameterInfo => [_in_table, _out_sas_dataset, _replace_sas_dataset.GetGPValue(), _use_domain_and_subtype_description.GetGPValue(), _use_cas_connection.GetGPValue(), _hostname, _port, _username, _password];

        /// <summary>
        /// <para>Input Table</para>
        /// <para>The input table.</para>
        /// <para>输入表。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Input Table")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _in_table { get; set; }


        /// <summary>
        /// <para>Output SAS Dataset (libref.tablename)</para>
        /// <para>The output SAS dataset. Provide the dataset in the form libref.table in which libref is the name of a SAS library and table is the name of the SAS table.</para>
        /// <para>输出 SAS 数据集。以 libref.table 的形式提供数据集，其中 libref 是 SAS 库的名称，table 是 SAS 表的名称。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Output SAS Dataset (libref.tablename)")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _out_sas_dataset { get; set; }


        /// <summary>
        /// <para>Replace SAS Dataset</para>
        /// <para><xdoc>
        ///   <para>Specifies whether an existing SAS dataset will be overwritten by the output.
        ///   <bulletList>
        ///     <bullet_item>Checked—The output SAS dataset will be overwritten.  </bullet_item><para/>
        ///     <bullet_item>Unchecked—The output SAS dataset will not be overwritten. This is the default.  </bullet_item><para/>
        ///   </bulletList>
        ///   </para>
        /// </xdoc></para>
        /// <para><xdoc>
        /// <para>指定输出是否覆盖现有 SAS 数据集。
        ///   <bulletList>
        ///     <bullet_item>选中 - 输出 SAS 数据集将被覆盖。</bullet_item><para/>
        ///     <bullet_item>未选中 - 输出 SAS 数据集不会被覆盖。这是默认设置。 </bullet_item><para/>
        ///   </bulletList>
        ///   </para>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Replace SAS Dataset")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _replace_sas_dataset_value? _replace_sas_dataset { get; set; } = null;

        public enum _replace_sas_dataset_value
        {
            /// <summary>
            /// <para>OVERWRITE</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("OVERWRITE")]
            [GPEnumValue("true")]
            _true,

            /// <summary>
            /// <para>NO_OVERWRITE</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("NO_OVERWRITE")]
            [GPEnumValue("false")]
            _false,

        }

        /// <summary>
        /// <para>Use Domain and Subtype Descriptions</para>
        /// <para><xdoc>
        ///   <para>Specifies whether domain and subtype descriptions will be included in the output SAS dataset.
        ///   <bulletList>
        ///     <bullet_item>Checked—Domain and subtype descriptions will be included in the output SAS dataset.  </bullet_item><para/>
        ///     <bullet_item>Unchecked—Domain and subtype descriptions will not be included in the output SAS dataset. This is the default.  </bullet_item><para/>
        ///   </bulletList>
        ///   </para>
        /// </xdoc></para>
        /// <para><xdoc>
        /// <para>指定是否将域和子类型描述包含在输出 SAS 数据集中。
        ///   <bulletList>
        ///     <bullet_item>选中 - 域和子类型描述将包含在输出 SAS 数据集中。</bullet_item><para/>
        ///     <bullet_item>未选中 - 域和子类型描述将不包括在输出 SAS 数据集中。这是默认设置。 </bullet_item><para/>
        ///   </bulletList>
        ///   </para>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Use Domain and Subtype Descriptions")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _use_domain_and_subtype_description_value? _use_domain_and_subtype_description { get; set; } = null;

        public enum _use_domain_and_subtype_description_value
        {
            /// <summary>
            /// <para>USE_DOMAIN</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("USE_DOMAIN")]
            [GPEnumValue("true")]
            _true,

            /// <summary>
            /// <para>NO_DOMAIN</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("NO_DOMAIN")]
            [GPEnumValue("false")]
            _false,

        }

        /// <summary>
        /// <para>Upload SAS Dataset to SAS Cloud Analytic Services (CAS)</para>
        /// <para><xdoc>
        ///   <para>Specifies whether the output SAS dataset will be uploaded to CAS or saved in a local SAS library.
        ///   <bulletList>
        ///     <bullet_item>Checked—The output SAS dataset will be uploaded to CAS.  </bullet_item><para/>
        ///     <bullet_item>Unchecked—The output SAS dataset will be saved in a local SAS library. This is the default.  </bullet_item><para/>
        ///   </bulletList>
        ///   </para>
        /// </xdoc></para>
        /// <para><xdoc>
        /// <para>指定输出 SAS 数据集是上载到 CAS 还是保存在本地 SAS 库中。
        ///   <bulletList>
        ///     <bullet_item>选中—输出 SAS 数据集将上传到 CAS。</bullet_item><para/>
        ///     <bullet_item>未选中 - 输出 SAS 数据集将保存在本地 SAS 库中。这是默认设置。 </bullet_item><para/>
        ///   </bulletList>
        ///   </para>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Upload SAS Dataset to SAS Cloud Analytic Services (CAS)")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _use_cas_connection_value _use_cas_connection { get; set; } = _use_cas_connection_value._false;

        public enum _use_cas_connection_value
        {
            /// <summary>
            /// <para>USE_CAS</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("USE_CAS")]
            [GPEnumValue("true")]
            _true,

            /// <summary>
            /// <para>LOCAL_SAS</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("LOCAL_SAS")]
            [GPEnumValue("false")]
            _false,

        }

        /// <summary>
        /// <para>CAS Hostname URL</para>
        /// <para>The URL of the CAS host.</para>
        /// <para>CAS 主机的 URL。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("CAS Hostname URL")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _hostname { get; set; } = null;


        /// <summary>
        /// <para>Port</para>
        /// <para>The port of the CAS connection.</para>
        /// <para>CAS 连接的端口。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Port")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public long? _port { get; set; } = null;


        /// <summary>
        /// <para>CAS Username</para>
        /// <para>The user name for the CAS connection.</para>
        /// <para>CAS 连接的用户名。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("CAS Username")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _username { get; set; } = null;


        /// <summary>
        /// <para>Password</para>
        /// <para>The password for the CAS connection. This password is hidden and not accessible after running the tool.</para>
        /// <para>CAS 连接的密码。此密码处于隐藏状态，运行该工具后无法访问。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Password")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _password { get; set; } = null;


        public TableToSAS SetEnv()
        {
            base.SetEnv();
            return this;
        }

    }

}